package main

import (
	"fmt"
	"sync"
	"time"
)

var wait sync.WaitGroup
var mp = map[string]string{}

func reader(){
	for{
		fmt.Println(mp["time"])
	}
	wait.Done()
}

func writer(){
	mp["time"] = time.Now().Format("15:04:05")
	wait.Done()
}

func main(){
	wait.Add(2)
	go reader()
	go writer()
	wait.Wait()
}

